package Day11;

/**
 * @author HYHwtx
 * @version 1.0
 * @date 2022/2/17 9:15
 */
public class Test02 {
    public static void main(String[] args) {
        int[] array = {10,20,30,40,50,60,70,80,90};
        for (int i = 0; i < array.length; i++) {
            System.out.print(array[i]+" ");
        }

        for (int min = 0,max = array.length-1;min<max;min++,max--){
            int temp = array[min];
            array[min] = array[max];
            array[max] = temp;
        }
        System.out.println("逆序后的结果是：");
        //再次打印输出之后的样子
        for (int i = 0; i < array.length; i++) {
            System.out.print(array[i]+" ");
        }
    }
}

